// part1:C14:ex14.43.cpp
// if a int value could be divided by all elements of vector<int>
bool dividedByall(vector<int> &ivec, int dividend)
{
    return count_if(ivec.begin(), ivec.end(), bind1st(modulus<int>,
      dividend));
}